﻿#ifndef HOMEPAGE_H
#define HOMEPAGE_H



#include <QTextToSpeech>
#include <QTimer>
#include <QWidget>




#include "FaceModule/FaceWgt.h"
#include "FingerModule/FingerWgt.h"
#include "Recorder.h"

namespace Ui {
class HomePage;
}

class HomePage : public QWidget
{
    Q_OBJECT

public:
    explicit HomePage(QWidget *parent = nullptr);
    ~HomePage();
    virtual void closeEvent(QCloseEvent *event) override;

    void onPlayViocePrompt(QString text);

signals:


private:
    void onApplySetting(); //应用设置.
    void onCancelSetting(); //取消设置.
    void onUpdateImage();

private:
    Ui::HomePage *ui;

    QString m_companyName; //公司名称.
    QTime m_signInTime; //上班签到时间.
    QTime m_signOutTime; //下班签退时间.
    QTextToSpeech m_tts; //文本2语音实例.
    bool m_speechFlag {true}; //语音开关.
    QString m_gender {"Female"};  //语音性别嗓音：Male、Female可选.
    double m_pitch {0.0}; //语音音调：-1.0 至 +1.0.
    double m_rate {0.0}; //语音音速：-1.0 至 +1.0.
    double m_volume;     //语音响度：0~1;

    FingerWgt *m_fingerWgt {nullptr};
    Recorder *m_recoder {nullptr};

    QTimer *m_clockTimer {nullptr};

    FaceWgt *m_faceWgt {nullptr};

    QPixmap m_pix;
};

#endif // HOMEPAGE_H
